import { request } from '@/utils/request/request';
import { RequestEnum } from '@/enums/httpEnum';

export const likeApi = {
  likeAddOrDel: '/userLikeLink/addOrDel',
  likeList: '/userLikeLink/list',
} as const;

export const likeUpdate = (data: API.commentInteractionUpdate) => {
  return request({
    url: likeApi.likeAddOrDel,
    method: RequestEnum.POST,
    data,
  });
};

export const getLikeList = (params: API.collectionAndLikeRequest) => {
  return request({
    url: likeApi.likeList,
    method: RequestEnum.GET,
    params,
  });
};
